import React from "react";
import {sytRequest} from "@/request";
// GET /admin/hosp/hospitalSet/{page}/{limit}
// 获取分页列表

export const getHospitalSet = (page:number,limit:number)=>{
    return sytRequest.get(`/hosp/hospitalSet/${page}/${limit}`)
}

// GET /admin/hosp/hospitalSet/lock/{id}/{status}
// 锁定
export const getHospitalSetLockById = (id:number,status:number)=>{
    return sytRequest.get(`/hosp/hospitalSet/lock/${id}/${status===0?1:0}`)
}

// POST /admin/hosp/hospitalSet/save
// 新增医院设置
export const postHospitalSetSave = (body:any)=>{
    return sytRequest.post("/hosp/hospitalSet/save",body);
}

// PUT /admin/hosp/hospitalSet/update
// 修改医院设置
export const putHospitalSetUpdate = (body:any)=>{
    return sytRequest.put(`/hosp/hospitalSet/update`,body);
}

// DELETE /admin/hosp/hospitalSet/remove/{id}
// 删除医院设置
export const deleteHospitalSetById = (id:number)=>{
    return sytRequest.delete(`/hosp/hospitalSet/remove/${id}`)
}

// DELETE /admin/hosp/hospitalSet/batchRemove
// 根据id列表删除医院设置
export const deleteHospitalSetBatchRemove = (data:React.Key[])=>{
    return sytRequest.delete(`/hosp/hospitalSet/batchRemove`,{
        data
    })
}